language: rust
cache: cargo
matrix:
  include:
    - name: "Tests and lints"
      before_install:
        - rustup component add clippy rustfmt
      script:
        - cargo test
        - cargo clippy --all-targets -- -D warnings
        - cargo fmt -- --check
    - name: "C tests on Windows"
      os: windows
      script:
        - cargo test -p wirefilter-ffi-ctests
    - name: "C tests on OS X"
      os: osx
      script:
        - cargo test -p wirefilter-ffi-ctests
    - name: "WASM build"
      before_install:
        - curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f
      script:
        - wasm-pack build wasm --debug --target browser --scope cloudflare
